-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve StorageInterface, add method get
#660
Conversation
- specifically for retrieving a single item from storage, without deep file traversal or requiring any iterables - default impl uses `at` underneath to implement it - update code in core to use it where suitable - also correct image servlet to only query for instances to DIM providers if specified
- Fix example code in #at - Clarify in #list that a trailing forward slash means that it's a directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that it useful.
I will merge it soon.
@bastiao Since the next Dicoogle version is intended to be a patch version, let's keep this PR on hold until we plan to deploy a feature release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might as well fix this typo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes are quite nice, and current behavior of these components remains functional. LGTM!
@bastiao Next version of Dicoogle should be 3.4.0, so we're ready to start merging this and the other ones in the milestone: |
This PR proposes a backwards-compatible extension to
StorageInterface
with default methodget
. Unlikeat
,get
is designed to retrieve up to a single item in storage, so it does not need file system tree traversal or building up iterables and iterators.A default implementation is provided that uses
at
underneath, but implementors may wish to override it for more efficiency.This PR also includes a few quality-of-life improvements, including some clarifications to other methods in the plugin interface.
Summary
StorageInterface#get
, to retrieve a single item from storageat
list
that a trailing forward slash means that it's a directory